<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('【请填写功能名称】列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>员工姓名：</label>
                                <input type="text" name="name"/>
                            </li>
                            <li>
                                <label>员工ID：</label>
                                <input type="text" name="staffId"/>
                            </li>
<!--                            <li>-->
<!--                                <label>岗位工资：</label>-->
<!--                                <input type="text" name="postSalary"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>全勤奖：</label>-->
<!--                                <input type="text" name="fullAttendanceAward"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>工龄工资：</label>-->
<!--                                <input type="text" name="seniorityPay"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>出勤工资：</label>-->
<!--                                <input type="text" name="attendanceWages"/>-->
<!--                            </li>-->
                            <li>
                                <label>年份：</label>
                                <input type="text" name="year"/>
                            </li>
                            <li>
                                <label>月份：</label>
                                <input type="text" name="month"/>
                            </li>
<!--                            <li>-->
<!--                                <label>本月天数：</label>-->
<!--                                <input type="text" name="monthDays"/>-->
<!--                            </li>-->
                            <li>
                                <label>出勤天数：</label>
                                <input type="text" name="attendanceDays"/>
                            </li>
<!--                            <li>-->
<!--                                <label>安全奖：</label>-->
<!--                                <input type="text" name="safetyAward"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>收运任务：</label>-->
<!--                                <input type="text" name="collectionTask"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>绩效：</label>-->
<!--                                <input type="text" name="achievements"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>团队奖励达120吨：</label>-->
<!--                                <input type="text" name="teamRewards"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>应发工资：</label>-->
<!--                                <input type="text" name="wagePayable"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>社保：</label>-->
<!--                                <input type="text" name="socialSecurity"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>个税：</label>-->
<!--                                <input type="text" name="personalIncomeTax"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>其他：</label>-->
<!--                                <input type="text" name="other"/>-->
<!--                            </li>-->
<!--                            <li>-->
<!--                                <label>实发金额：</label>-->
<!--                                <input type="text" name="issuedAmount"/>-->
<!--                            </li>-->
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:salary:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:salary:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:salary:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:salary:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:salary:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:salary:remove')}]];
        var prefix = ctx + "system/salary";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "【请填写功能名称】",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'name',
                    title: '员工姓名'
                },
                {
                    field: 'staffId',
                    title: '员工ID'
                },
                {
                    field: 'postSalary',
                    title: '岗位工资'
                },
                {
                    field: 'fullAttendanceAward',
                    title: '全勤奖'
                },
                {
                    field: 'seniorityPay',
                    title: '工龄工资'
                },
                {
                    field: 'attendanceWages',
                    title: '出勤工资'
                },
                {
                    field: 'year',
                    title: '年份'
                },
                {
                    field: 'month',
                    title: '月份'
                },
                {
                    field: 'monthDays',
                    title: '本月天数'
                },
                {
                    field: 'attendanceDays',
                    title: '出勤天数'
                },
                {
                    field: 'safetyAward',
                    title: '安全奖'
                },
                {
                    field: 'collectionTask',
                    title: '收运任务'
                },
                {
                    field: 'achievements',
                    title: '绩效'
                },
                {
                    field: 'teamRewards',
                    title: '团队奖励达120吨'
                },
                {
                    field: 'wagePayable',
                    title: '应发工资'
                },
                {
                    field: 'socialSecurity',
                    title: '社保'
                },
                {
                    field: 'personalIncomeTax',
                    title: '个税'
                },
                {
                    field: 'other',
                    title: '其他'
                },
                {
                    field: 'issuedAmount',
                    title: '实发金额'
                },
                {
                    field: 'remarks',
                    title: '备注'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>